package com.thinkcube.edutainment;

import org.androidannotations.annotations.Click;
import org.androidannotations.annotations.EActivity;
import org.androidannotations.annotations.Fullscreen;
import org.androidannotations.annotations.UiThread;
import org.androidannotations.annotations.sharedpreferences.Pref;

import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.widget.Toast;

import com.thinkcube.edutainment.login.WebViewActivity_;
import com.thinkcube.edutainment.service.SPreferences_;

@Fullscreen
@EActivity(R.layout.splash_layout_activity)
public class SplashActivity extends Activity {

	@Pref
	SPreferences_ pref;

	@Click({ R.id.login_account })
	void onClickEvent(final View view) {
		int viewId = view.getId();
		switch (viewId) {

		case R.id.login_account:
			// showMessge("login_account");
			// if (pref.getId().exists()) {
			// Intent placesListActivity = new Intent(this,
			// LoginActivity_.class);
			// startActivity(placesListActivity);
			// } else {
			Intent intent = new Intent(this, WebViewActivity_.class);
			startActivity(intent);
			finish();

			// }
			break;
		default:
			break;
		}
	}

	@UiThread
	void showMessge(final String msg) {
		Toast.makeText(SplashActivity.this, msg, Toast.LENGTH_LONG).show();
	}

}
